package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

public class TmcUser extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** $column.columnComment */
    private Long publicuserId;

    /** 手机号 */
    @Excel(name = "手机号")
    private String cellphone;

    /** 姓名 */
    @Excel(name = "姓名")
    private String username;

    /** 小程序OpenID */
    @Excel(name = "小程序OpenID")
    private String openid;
    @Excel(name = "小程序tokey")
    private String AccessToken;

    /** 用户头像 */
    @Excel(name = "用户头像")
    private String avatarurl;

    /** 用户状态。0.未绑定，1绑定，2已授权 */
    @Excel(name = "用户状态。0.未绑定，1绑定，2已授权")
    private Long state;

    /**创建时间*/
    @Excel(name = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createtime;

    private List<TmcUserHouse> houseList;

    public String getAccessToken() {
        return AccessToken;
    }

    public void setAccessToken(String accessToken) {
        AccessToken = accessToken;
    }

    public void setPublicuserId(Long publicuserId)
    {
        this.publicuserId = publicuserId;
    }

    public Long getPublicuserId()
    {
        return publicuserId;
    }
    public void setCellphone(String cellphone)
    {
        this.cellphone = cellphone;
    }

    public String getCellphone()
    {
        return cellphone;
    }
    public void setUsername(String username)
    {
        this.username = username;
    }

    public String getUsername()
    {
        return username;
    }
    public void setOpenid(String openid)
    {
        this.openid = openid;
    }

    public String getOpenid()
    {
        return openid;
    }
    public void setAvatarurl(String avatarurl)
    {
        this.avatarurl = avatarurl;
    }

    public String getAvatarurl()
    {
        return avatarurl;
    }
    public void setState(Long state)
    {
        this.state = state;
    }

    public Long getState()
    {
        return state;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public List<TmcUserHouse> getHouseList() {
        return houseList;
    }

    public void setHouseList(List<TmcUserHouse> houseList) {
        this.houseList = houseList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getPublicuserId())
                .append("cellphone", getCellphone())
                .append("username", getUsername())
                .append("openid", getOpenid())
                .append("avatarurl", getAvatarurl())
                .append("state", getState())
                .append("createtime", getCreatetime())
                .toString();
    }
}
